package it.enricod.jcontextfree.engine.model.impl;

import it.enricod.jcontextfree.engine.model.IFigureParamValues;
import it.enricod.jcontextfree.engine.model.IFigureParameters;

public class FigureParameters implements IFigureParameters {

	private IFigureParamValues relative = new FigureParamValues();
	private IFigureParamValues transform = new FigureParamValues();

	public IFigureParamValues getAbsolute() {
		IFigureParamValues result = new FigureParamValues();
		result.setX(relative.getX() + transform.getX());
		result.setY(relative.getY() + transform.getY());
		result.setRotation(relative.getRotation() + transform.getRotation());
		result.setScale(relative.getScale() * transform.getScale());
		return result;
	}

	public IFigureParamValues getRelative() {
		return relative;
	}

	public IFigureParamValues getTransform() {
		return transform;
	}

}
